#include <algorithm>
#include <vector>
#include <iostream>
#include <iterator>
#include <cmath>
#include <cstdlib>
#include <catch2/catch.hpp>
#include <utils.hpp>
#include <wasm_config.hpp>
#include <eosio/vm/backend.hpp>

using namespace eosio;
using namespace eosio::vm;
extern wasm_allocator wa;

BACKEND_TEST_CASE( "Testing wasm <names_0_wasm>", "[names_0_wasm_tests]" ) {
   using backend_t = backend<std::nullptr_t, TestType>;
   auto code = backend_t::read_wasm( std::string(wasm_directory) + "names.0.wasm");
   backend_t bkend( code );
   bkend.set_wasm_allocator( &wa );
   bkend.initialize(nullptr);

   CHECK(bkend.call_with_return(nullptr, "env", "foo")->to_ui32() == UINT32_C(0));
}

BACKEND_TEST_CASE( "Testing wasm <names_1_wasm>", "[names_1_wasm_tests]" ) {
   using backend_t = backend<std::nullptr_t, TestType>;
   auto code = backend_t::read_wasm( std::string(wasm_directory) + "names.1.wasm");
   backend_t bkend( code );
   bkend.set_wasm_allocator( &wa );
   bkend.initialize(nullptr);

   CHECK(bkend.call_with_return(nullptr, "env", "foo")->to_ui32() == UINT32_C(1));
}

BACKEND_TEST_CASE( "Testing wasm <names_2_wasm>", "[names_2_wasm_tests]" ) {
   using backend_t = backend<std::nullptr_t, TestType>;
   auto code = backend_t::read_wasm( std::string(wasm_directory) + "names.2.wasm");
   backend_t bkend( code );
   bkend.set_wasm_allocator( &wa );
   bkend.initialize(nullptr);

   CHECK(bkend.call_with_return(nullptr, "env", "")->to_ui32() == UINT32_C(0));
   CHECK(bkend.call_with_return(nullptr, "env", "0")->to_ui32() == UINT32_C(1));
   CHECK(bkend.call_with_return(nullptr, "env", "-0")->to_ui32() == UINT32_C(2));
   CHECK(bkend.call_with_return(nullptr, "env", "_")->to_ui32() == UINT32_C(3));
   CHECK(bkend.call_with_return(nullptr, "env", "$")->to_ui32() == UINT32_C(4));
   CHECK(bkend.call_with_return(nullptr, "env", "@")->to_ui32() == UINT32_C(5));
   CHECK(bkend.call_with_return(nullptr, "env", "~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./ ")->to_ui32() == UINT32_C(6));
   CHECK(bkend.call_with_return(nullptr, "env", "NaN")->to_ui32() == UINT32_C(7));
   CHECK(bkend.call_with_return(nullptr, "env", "Infinity")->to_ui32() == UINT32_C(8));
   CHECK(bkend.call_with_return(nullptr, "env", "if")->to_ui32() == UINT32_C(9));
   CHECK(bkend.call_with_return(nullptr, "env", "malloc")->to_ui32() == UINT32_C(10));
   CHECK(bkend.call_with_return(nullptr, "env", "_malloc")->to_ui32() == UINT32_C(11));
   CHECK(bkend.call_with_return(nullptr, "env", "__malloc")->to_ui32() == UINT32_C(12));
   CHECK(bkend.call_with_return(nullptr, "env", "a")->to_ui32() == UINT32_C(13));
   CHECK(bkend.call_with_return(nullptr, "env", "A")->to_ui32() == UINT32_C(14));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\273\277")->to_ui32() == UINT32_C(15));
   CHECK(bkend.call_with_return(nullptr, "env", "\303\205")->to_ui32() == UINT32_C(16));
   CHECK(bkend.call_with_return(nullptr, "env", "A\314\212")->to_ui32() == UINT32_C(17));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\204\253")->to_ui32() == UINT32_C(18));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\254\203")->to_ui32() == UINT32_C(19));
   CHECK(bkend.call_with_return(nullptr, "env", "f\357\254\201")->to_ui32() == UINT32_C(20));
   CHECK(bkend.call_with_return(nullptr, "env", "ffi")->to_ui32() == UINT32_C(21));
   CHECK(bkend.call_with_return(nullptr, "env", std::string("\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017", 16))->to_ui32() == UINT32_C(22));
   CHECK(bkend.call_with_return(nullptr, "env", "\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037")->to_ui32() == UINT32_C(23));
   CHECK(bkend.call_with_return(nullptr, "env", " ")->to_ui32() == UINT32_C(24));
   CHECK(bkend.call_with_return(nullptr, "env", "\302\200\302\201\302\202\302\203\302\204\302\205\302\206\302\207\302\210\302\211\302\212\302\213\302\214\302\215\302\216\302\217")->to_ui32() == UINT32_C(25));
   CHECK(bkend.call_with_return(nullptr, "env", "\302\220\302\221\302\222\302\223\302\224\302\225\302\226\302\227\302\230\302\231\302\232\302\233\302\234\302\235\302\236\302\237")->to_ui32() == UINT32_C(26));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\277\260\357\277\261\357\277\262\357\277\263\357\277\264\357\277\265\357\277\266\357\277\267")->to_ui32() == UINT32_C(27));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\277\270\357\277\271\357\277\272\357\277\273\357\277\274\357\277\275\357\277\276\357\277\277")->to_ui32() == UINT32_C(28));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\220\200\342\220\201\342\220\202\342\220\203\342\220\204\342\220\205\342\220\206\342\220\207\342\220\210\342\220\211\342\220\212\342\220\213\342\220\214\342\220\215\342\220\216\342\220\217")->to_ui32() == UINT32_C(29));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\220\220\342\220\221\342\220\222\342\220\223\342\220\224\342\220\225\342\220\226\342\220\227\342\220\230\342\220\231\342\220\232\342\220\233\342\220\234\342\220\235\342\220\236\342\220\237")->to_ui32() == UINT32_C(30));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\220\240\342\220\241")->to_ui32() == UINT32_C(31));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\277\260\357\277\261\357\277\262\357\277\263\357\277\264\357\277\265\357\277\266\357\277\267\357\277\270\357\277\271\357\277\272\357\277\273\357\277\274\357\277\275")->to_ui32() == UINT32_C(32));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\200\215")->to_ui32() == UINT32_C(33));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\200\214")->to_ui32() == UINT32_C(34));
   CHECK(bkend.call_with_return(nullptr, "env", "\315\217")->to_ui32() == UINT32_C(35));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\201\240")->to_ui32() == UINT32_C(36));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\265\277")->to_ui32() == UINT32_C(37));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\221\201\277")->to_ui32() == UINT32_C(38));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\240\216")->to_ui32() == UINT32_C(39));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\277\257\342\200\213\302\240\302\255\342\201\240\341\232\200\342\200\256\342\200\255")->to_ui32() == UINT32_C(40));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\200\216\342\200\217\342\200\221\342\200\250\342\200\251\342\200\252\342\200\253\342\200\254\342\200\257\342\201\246\342\201\247\342\201\250\342\201\251")->to_ui32() == UINT32_C(41));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\201\252\342\201\253\342\201\254\342\201\255\342\201\256\342\201\257")->to_ui32() == UINT32_C(42));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\201\241\342\201\242\342\201\243\342\201\244")->to_ui32() == UINT32_C(43));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\220\200\200\363\237\277\277\364\217\277\277")->to_ui32() == UINT32_C(44));
   CHECK(bkend.call_with_return(nullptr, "env", "Z\314\217\315\206\314\206\315\233\315\214\314\264\315\230\315\236\315\207\314\253\314\245\314\252\315\223\315\210\315\224\315\216\314\227\314\236\314\272\314\257\314\261\314\236\314\231\314\261\314\234\314\226\314\240a\315\227\315\250\314\216\314\204\314\206\315\227\314\277\315\241\315\237\315\200\314\266\315\201\314\245\314\260\314\263\314\255\315\231\314\262\314\261\314\271\314\235\315\216\314\274l\315\204\315\212\314\232\315\227\315\246\315\204\315\253\314\207\315\201\314\266\314\267\315\211\314\251\314\271\314\253\314\235\315\226\315\205\314\231\314\262\314\274\315\207\315\232\315\215\314\256\315\216\314\245\315\205\314\236g\315\203\314\220\314\205\315\256\314\224\314\220\314\216\314\202\314\217\314\276\315\212\314\215\315\213\315\212\315\247\314\201\314\206\315\246\315\236\314\266\315\225\315\224\315\232\314\251o\315\213\314\224\315\220\315\252\315\251\314\241\315\217\314\242\314\247\315\201\314\253\314\231\314\244\314\256\315\226\315\231\315\223\314\272\314\234\314\251\314\274\314\230\314\240")->to_ui32() == UINT32_C(45));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\205\237\341\205\240\343\205\244\357\276\240")->to_ui32() == UINT32_C(46));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\270\200")->to_ui32() == UINT32_C(47));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\270\204")->to_ui32() == UINT32_C(48));
   CHECK(bkend.call_with_return(nullptr, "env", "\363\240\204\200")->to_ui32() == UINT32_C(49));
   CHECK(bkend.call_with_return(nullptr, "env", "\363\240\207\257")->to_ui32() == UINT32_C(50));
   CHECK(bkend.call_with_return(nullptr, "env", "\314\210")->to_ui32() == UINT32_C(51));
   CHECK(bkend.call_with_return(nullptr, "env", "\012")->to_ui32() == UINT32_C(52));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\220\244")->to_ui32() == UINT32_C(53));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\200\250")->to_ui32() == UINT32_C(54));
   CHECK(bkend.call_with_return(nullptr, "env", "\015")->to_ui32() == UINT32_C(55));
   CHECK(bkend.call_with_return(nullptr, "env", "\015\012")->to_ui32() == UINT32_C(56));
   CHECK(bkend.call_with_return(nullptr, "env", "\012\015")->to_ui32() == UINT32_C(57));
   CHECK(bkend.call_with_return(nullptr, "env", "\036")->to_ui32() == UINT32_C(58));
   CHECK(bkend.call_with_return(nullptr, "env", "\013")->to_ui32() == UINT32_C(59));
   CHECK(bkend.call_with_return(nullptr, "env", "\014")->to_ui32() == UINT32_C(60));
   CHECK(bkend.call_with_return(nullptr, "env", "\302\205")->to_ui32() == UINT32_C(61));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\200\251")->to_ui32() == UINT32_C(62));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\200\246")->to_ui32() == UINT32_C(63));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\217\216")->to_ui32() == UINT32_C(64));
   CHECK(bkend.call_with_return(nullptr, "env", "\302\213")->to_ui32() == UINT32_C(65));
   CHECK(bkend.call_with_return(nullptr, "env", "\302\214")->to_ui32() == UINT32_C(66));
   CHECK(bkend.call_with_return(nullptr, "env", "\302\215")->to_ui32() == UINT32_C(67));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\206\265")->to_ui32() == UINT32_C(68));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\206\251")->to_ui32() == UINT32_C(69));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\214\244")->to_ui32() == UINT32_C(70));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\244\266")->to_ui32() == UINT32_C(71));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\206\262")->to_ui32() == UINT32_C(72));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\256\250")->to_ui32() == UINT32_C(73));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\256\260")->to_ui32() == UINT32_C(74));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\277\275")->to_ui32() == UINT32_C(75));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\220")->to_ui32() == UINT32_C(76));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\221")->to_ui32() == UINT32_C(77));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\222")->to_ui32() == UINT32_C(78));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\223")->to_ui32() == UINT32_C(79));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\224")->to_ui32() == UINT32_C(80));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\225")->to_ui32() == UINT32_C(81));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\226")->to_ui32() == UINT32_C(82));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\227")->to_ui32() == UINT32_C(83));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\230")->to_ui32() == UINT32_C(84));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\231")->to_ui32() == UINT32_C(85));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\232")->to_ui32() == UINT32_C(86));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\233")->to_ui32() == UINT32_C(87));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\234")->to_ui32() == UINT32_C(88));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\235")->to_ui32() == UINT32_C(89));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\236")->to_ui32() == UINT32_C(90));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\237")->to_ui32() == UINT32_C(91));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\240")->to_ui32() == UINT32_C(92));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\241")->to_ui32() == UINT32_C(93));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\242")->to_ui32() == UINT32_C(94));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\243")->to_ui32() == UINT32_C(95));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\244")->to_ui32() == UINT32_C(96));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\245")->to_ui32() == UINT32_C(97));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\246")->to_ui32() == UINT32_C(98));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\247")->to_ui32() == UINT32_C(99));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\250")->to_ui32() == UINT32_C(100));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\251")->to_ui32() == UINT32_C(101));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\252")->to_ui32() == UINT32_C(102));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\253")->to_ui32() == UINT32_C(103));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\254")->to_ui32() == UINT32_C(104));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\255")->to_ui32() == UINT32_C(105));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\256")->to_ui32() == UINT32_C(106));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\267\257")->to_ui32() == UINT32_C(107));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\277\276")->to_ui32() == UINT32_C(108));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\277\277")->to_ui32() == UINT32_C(109));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\237\277\276")->to_ui32() == UINT32_C(110));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\237\277\277")->to_ui32() == UINT32_C(111));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\257\277\276")->to_ui32() == UINT32_C(112));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\257\277\277")->to_ui32() == UINT32_C(113));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\277\277\276")->to_ui32() == UINT32_C(114));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\277\277\277")->to_ui32() == UINT32_C(115));
   CHECK(bkend.call_with_return(nullptr, "env", "\361\217\277\276")->to_ui32() == UINT32_C(116));
   CHECK(bkend.call_with_return(nullptr, "env", "\361\217\277\277")->to_ui32() == UINT32_C(117));
   CHECK(bkend.call_with_return(nullptr, "env", "\361\237\277\276")->to_ui32() == UINT32_C(118));
   CHECK(bkend.call_with_return(nullptr, "env", "\361\237\277\277")->to_ui32() == UINT32_C(119));
   CHECK(bkend.call_with_return(nullptr, "env", "\361\257\277\276")->to_ui32() == UINT32_C(120));
   CHECK(bkend.call_with_return(nullptr, "env", "\361\257\277\277")->to_ui32() == UINT32_C(121));
   CHECK(bkend.call_with_return(nullptr, "env", "\361\277\277\276")->to_ui32() == UINT32_C(122));
   CHECK(bkend.call_with_return(nullptr, "env", "\361\277\277\277")->to_ui32() == UINT32_C(123));
   CHECK(bkend.call_with_return(nullptr, "env", "\362\217\277\276")->to_ui32() == UINT32_C(124));
   CHECK(bkend.call_with_return(nullptr, "env", "\362\217\277\277")->to_ui32() == UINT32_C(125));
   CHECK(bkend.call_with_return(nullptr, "env", "\362\237\277\276")->to_ui32() == UINT32_C(126));
   CHECK(bkend.call_with_return(nullptr, "env", "\362\237\277\277")->to_ui32() == UINT32_C(127));
   CHECK(bkend.call_with_return(nullptr, "env", "\362\257\277\276")->to_ui32() == UINT32_C(128));
   CHECK(bkend.call_with_return(nullptr, "env", "\362\257\277\277")->to_ui32() == UINT32_C(129));
   CHECK(bkend.call_with_return(nullptr, "env", "\362\277\277\276")->to_ui32() == UINT32_C(130));
   CHECK(bkend.call_with_return(nullptr, "env", "\362\277\277\277")->to_ui32() == UINT32_C(131));
   CHECK(bkend.call_with_return(nullptr, "env", "\363\217\277\276")->to_ui32() == UINT32_C(132));
   CHECK(bkend.call_with_return(nullptr, "env", "\363\217\277\277")->to_ui32() == UINT32_C(133));
   CHECK(bkend.call_with_return(nullptr, "env", "\363\237\277\276")->to_ui32() == UINT32_C(134));
   CHECK(bkend.call_with_return(nullptr, "env", "\363\237\277\277")->to_ui32() == UINT32_C(135));
   CHECK(bkend.call_with_return(nullptr, "env", "\363\257\277\276")->to_ui32() == UINT32_C(136));
   CHECK(bkend.call_with_return(nullptr, "env", "\363\257\277\277")->to_ui32() == UINT32_C(137));
   CHECK(bkend.call_with_return(nullptr, "env", "\363\277\277\276")->to_ui32() == UINT32_C(138));
   CHECK(bkend.call_with_return(nullptr, "env", "\363\277\277\277")->to_ui32() == UINT32_C(139));
   CHECK(bkend.call_with_return(nullptr, "env", "\364\217\277\276")->to_ui32() == UINT32_C(140));
   CHECK(bkend.call_with_return(nullptr, "env", "\364\217\277\277")->to_ui32() == UINT32_C(141));
   CHECK(bkend.call_with_return(nullptr, "env", "\314\210\342\200\275\314\210\314\211")->to_ui32() == UINT32_C(142));
   CHECK(bkend.call_with_return(nullptr, "env", "abc")->to_ui32() == UINT32_C(143));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\200\255abc")->to_ui32() == UINT32_C(144));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\200\256cba")->to_ui32() == UINT32_C(145));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\200\255abc\342\200\256")->to_ui32() == UINT32_C(146));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\200\256cba\342\200\255")->to_ui32() == UINT32_C(147));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\235\221\250")->to_ui32() == UINT32_C(148));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\235\220\264")->to_ui32() == UINT32_C(149));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\235\230\210")->to_ui32() == UINT32_C(150));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\235\230\274")->to_ui32() == UINT32_C(151));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\235\220\200")->to_ui32() == UINT32_C(152));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\235\223\220")->to_ui32() == UINT32_C(153));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\235\225\254")->to_ui32() == UINT32_C(154));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\235\227\224")->to_ui32() == UINT32_C(155));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\235\222\234")->to_ui32() == UINT32_C(156));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\235\224\204")->to_ui32() == UINT32_C(157));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\235\224\270")->to_ui32() == UINT32_C(158));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\235\226\240")->to_ui32() == UINT32_C(159));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\235\231\260")->to_ui32() == UINT32_C(160));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\264\200")->to_ui32() == UINT32_C(161));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\264\254")->to_ui32() == UINT32_C(162));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\222\266")->to_ui32() == UINT32_C(163));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\274\241")->to_ui32() == UINT32_C(164));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\237\204\220")->to_ui32() == UINT32_C(165));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\237\204\260")->to_ui32() == UINT32_C(166));
   CHECK(bkend.call_with_return(nullptr, "env", "\363\240\201\201")->to_ui32() == UINT32_C(167));
   CHECK(bkend.call_with_return(nullptr, "env", "U+0041")->to_ui32() == UINT32_C(168));
   CHECK(bkend.call_with_return(nullptr, "env", "A\342\200\213")->to_ui32() == UINT32_C(169));
   CHECK(bkend.call_with_return(nullptr, "env", "\320\220")->to_ui32() == UINT32_C(170));
   CHECK(bkend.call_with_return(nullptr, "env", "\352\231\226")->to_ui32() == UINT32_C(171));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\267\274")->to_ui32() == UINT32_C(172));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\267\266")->to_ui32() == UINT32_C(173));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\261\257")->to_ui32() == UINT32_C(174));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\237\205\220")->to_ui32() == UINT32_C(175));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\237\205\260")->to_ui32() == UINT32_C(176));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\260\255")->to_ui32() == UINT32_C(177));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\220\220\202")->to_ui32() == UINT32_C(178));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\220\220\210")->to_ui32() == UINT32_C(179));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\220\222\260")->to_ui32() == UINT32_C(180));
   CHECK(bkend.call_with_return(nullptr, "env", "\303\200")->to_ui32() == UINT32_C(181));
   CHECK(bkend.call_with_return(nullptr, "env", "\303\201")->to_ui32() == UINT32_C(182));
   CHECK(bkend.call_with_return(nullptr, "env", "\303\202")->to_ui32() == UINT32_C(183));
   CHECK(bkend.call_with_return(nullptr, "env", "\303\203")->to_ui32() == UINT32_C(184));
   CHECK(bkend.call_with_return(nullptr, "env", "\303\204")->to_ui32() == UINT32_C(185));
   CHECK(bkend.call_with_return(nullptr, "env", "\304\200")->to_ui32() == UINT32_C(186));
   CHECK(bkend.call_with_return(nullptr, "env", "\304\202")->to_ui32() == UINT32_C(187));
   CHECK(bkend.call_with_return(nullptr, "env", "\304\204")->to_ui32() == UINT32_C(188));
   CHECK(bkend.call_with_return(nullptr, "env", "\307\215")->to_ui32() == UINT32_C(189));
   CHECK(bkend.call_with_return(nullptr, "env", "\307\236")->to_ui32() == UINT32_C(190));
   CHECK(bkend.call_with_return(nullptr, "env", "\307\240")->to_ui32() == UINT32_C(191));
   CHECK(bkend.call_with_return(nullptr, "env", "\307\272")->to_ui32() == UINT32_C(192));
   CHECK(bkend.call_with_return(nullptr, "env", "\310\200")->to_ui32() == UINT32_C(193));
   CHECK(bkend.call_with_return(nullptr, "env", "\310\202")->to_ui32() == UINT32_C(194));
   CHECK(bkend.call_with_return(nullptr, "env", "\310\246")->to_ui32() == UINT32_C(195));
   CHECK(bkend.call_with_return(nullptr, "env", "\310\272")->to_ui32() == UINT32_C(196));
   CHECK(bkend.call_with_return(nullptr, "env", "\323\220")->to_ui32() == UINT32_C(197));
   CHECK(bkend.call_with_return(nullptr, "env", "\323\222")->to_ui32() == UINT32_C(198));
   CHECK(bkend.call_with_return(nullptr, "env", "\337\212")->to_ui32() == UINT32_C(199));
   CHECK(bkend.call_with_return(nullptr, "env", "\340\240\241")->to_ui32() == UINT32_C(200));
   CHECK(bkend.call_with_return(nullptr, "env", "\340\240\242")->to_ui32() == UINT32_C(201));
   CHECK(bkend.call_with_return(nullptr, "env", "\340\240\243")->to_ui32() == UINT32_C(202));
   CHECK(bkend.call_with_return(nullptr, "env", "\340\240\244")->to_ui32() == UINT32_C(203));
   CHECK(bkend.call_with_return(nullptr, "env", "\340\240\245")->to_ui32() == UINT32_C(204));
   CHECK(bkend.call_with_return(nullptr, "env", "\340\244\204")->to_ui32() == UINT32_C(205));
   CHECK(bkend.call_with_return(nullptr, "env", "\340\244\205")->to_ui32() == UINT32_C(206));
   CHECK(bkend.call_with_return(nullptr, "env", "\340\245\262")->to_ui32() == UINT32_C(207));
   CHECK(bkend.call_with_return(nullptr, "env", "\340\246\205")->to_ui32() == UINT32_C(208));
   CHECK(bkend.call_with_return(nullptr, "env", "\340\250\205")->to_ui32() == UINT32_C(209));
   CHECK(bkend.call_with_return(nullptr, "env", "\340\252\205")->to_ui32() == UINT32_C(210));
   CHECK(bkend.call_with_return(nullptr, "env", "\340\254\205")->to_ui32() == UINT32_C(211));
   CHECK(bkend.call_with_return(nullptr, "env", "\340\256\205")->to_ui32() == UINT32_C(212));
   CHECK(bkend.call_with_return(nullptr, "env", "\340\260\205")->to_ui32() == UINT32_C(213));
   CHECK(bkend.call_with_return(nullptr, "env", "\340\262\205")->to_ui32() == UINT32_C(214));
   CHECK(bkend.call_with_return(nullptr, "env", "\340\264\205")->to_ui32() == UINT32_C(215));
   CHECK(bkend.call_with_return(nullptr, "env", "\340\270\260")->to_ui32() == UINT32_C(216));
   CHECK(bkend.call_with_return(nullptr, "env", "\340\272\260")->to_ui32() == UINT32_C(217));
   CHECK(bkend.call_with_return(nullptr, "env", "\340\274\201")->to_ui32() == UINT32_C(218));
   CHECK(bkend.call_with_return(nullptr, "env", "\340\275\250")->to_ui32() == UINT32_C(219));
   CHECK(bkend.call_with_return(nullptr, "env", "\340\276\270")->to_ui32() == UINT32_C(220));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\200\241")->to_ui32() == UINT32_C(221));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\200\242")->to_ui32() == UINT32_C(222));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\202\234")->to_ui32() == UINT32_C(223));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\205\241")->to_ui32() == UINT32_C(224));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\212\240")->to_ui32() == UINT32_C(225));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\213\220")->to_ui32() == UINT32_C(226));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\216\240")->to_ui32() == UINT32_C(227));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\220\212")->to_ui32() == UINT32_C(228));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\226\263")->to_ui32() == UINT32_C(229));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\232\250")->to_ui32() == UINT32_C(230));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\232\252")->to_ui32() == UINT32_C(231));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\233\206")->to_ui32() == UINT32_C(232));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\234\200")->to_ui32() == UINT32_C(233));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\234\240")->to_ui32() == UINT32_C(234));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\235\200")->to_ui32() == UINT32_C(235));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\235\240")->to_ui32() == UINT32_C(236));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\240\240")->to_ui32() == UINT32_C(237));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\242\207")->to_ui32() == UINT32_C(238));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\244\240")->to_ui32() == UINT32_C(239));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\245\243")->to_ui32() == UINT32_C(240));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\250\225")->to_ui32() == UINT32_C(241));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\251\213")->to_ui32() == UINT32_C(242));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\251\241")->to_ui32() == UINT32_C(243));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\256\203")->to_ui32() == UINT32_C(244));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\257\200")->to_ui32() == UINT32_C(245));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\257\201")->to_ui32() == UINT32_C(246));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\260\243")->to_ui32() == UINT32_C(247));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\270\200")->to_ui32() == UINT32_C(248));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\272\240")->to_ui32() == UINT32_C(249));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\272\242")->to_ui32() == UINT32_C(250));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\272\244")->to_ui32() == UINT32_C(251));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\272\246")->to_ui32() == UINT32_C(252));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\272\250")->to_ui32() == UINT32_C(253));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\272\252")->to_ui32() == UINT32_C(254));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\272\254")->to_ui32() == UINT32_C(255));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\272\256")->to_ui32() == UINT32_C(256));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\272\260")->to_ui32() == UINT32_C(257));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\272\262")->to_ui32() == UINT32_C(258));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\272\264")->to_ui32() == UINT32_C(259));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\272\266")->to_ui32() == UINT32_C(260));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\201\202")->to_ui32() == UINT32_C(261));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\202\242")->to_ui32() == UINT32_C(262));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\204\232")->to_ui32() == UINT32_C(263));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\205\217")->to_ui32() == UINT32_C(264));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\210\216")->to_ui32() == UINT32_C(265));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\210\217")->to_ui32() == UINT32_C(266));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\210\220")->to_ui32() == UINT32_C(267));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\210\221")->to_ui32() == UINT32_C(268));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\210\222")->to_ui32() == UINT32_C(269));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\210\223")->to_ui32() == UINT32_C(270));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\210\224")->to_ui32() == UINT32_C(271));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\210\225")->to_ui32() == UINT32_C(272));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\210\226")->to_ui32() == UINT32_C(273));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\210\227")->to_ui32() == UINT32_C(274));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\210\230")->to_ui32() == UINT32_C(275));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\210\231")->to_ui32() == UINT32_C(276));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\210\232")->to_ui32() == UINT32_C(277));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\210\233")->to_ui32() == UINT32_C(278));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\211\256")->to_ui32() == UINT32_C(279));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\211\257")->to_ui32() == UINT32_C(280));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\211\260")->to_ui32() == UINT32_C(281));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\211\261")->to_ui32() == UINT32_C(282));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\211\262")->to_ui32() == UINT32_C(283));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\211\263")->to_ui32() == UINT32_C(284));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\211\264")->to_ui32() == UINT32_C(285));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\211\265")->to_ui32() == UINT32_C(286));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\211\266")->to_ui32() == UINT32_C(287));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\211\267")->to_ui32() == UINT32_C(288));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\211\270")->to_ui32() == UINT32_C(289));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\211\271")->to_ui32() == UINT32_C(290));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\211\272")->to_ui32() == UINT32_C(291));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\211\273")->to_ui32() == UINT32_C(292));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\213\220")->to_ui32() == UINT32_C(293));
   CHECK(bkend.call_with_return(nullptr, "env", "\352\200\212")->to_ui32() == UINT32_C(294));
   CHECK(bkend.call_with_return(nullptr, "env", "\352\223\256")->to_ui32() == UINT32_C(295));
   CHECK(bkend.call_with_return(nullptr, "env", "\352\225\211")->to_ui32() == UINT32_C(296));
   CHECK(bkend.call_with_return(nullptr, "env", "\352\232\240")->to_ui32() == UINT32_C(297));
   CHECK(bkend.call_with_return(nullptr, "env", "\352\240\200")->to_ui32() == UINT32_C(298));
   CHECK(bkend.call_with_return(nullptr, "env", "\352\240\243")->to_ui32() == UINT32_C(299));
   CHECK(bkend.call_with_return(nullptr, "env", "\352\241\235")->to_ui32() == UINT32_C(300));
   CHECK(bkend.call_with_return(nullptr, "env", "\352\242\202")->to_ui32() == UINT32_C(301));
   CHECK(bkend.call_with_return(nullptr, "env", "\352\243\252")->to_ui32() == UINT32_C(302));
   CHECK(bkend.call_with_return(nullptr, "env", "\352\244\242")->to_ui32() == UINT32_C(303));
   CHECK(bkend.call_with_return(nullptr, "env", "\352\245\206")->to_ui32() == UINT32_C(304));
   CHECK(bkend.call_with_return(nullptr, "env", "\352\246\204")->to_ui32() == UINT32_C(305));
   CHECK(bkend.call_with_return(nullptr, "env", "\352\250\200")->to_ui32() == UINT32_C(306));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\275\261")->to_ui32() == UINT32_C(307));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\277\202")->to_ui32() == UINT32_C(308));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\220\200\200")->to_ui32() == UINT32_C(309));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\220\212\200")->to_ui32() == UINT32_C(310));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\220\212\240")->to_ui32() == UINT32_C(311));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\220\214\200")->to_ui32() == UINT32_C(312));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\220\216\240")->to_ui32() == UINT32_C(313));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\220\222\226")->to_ui32() == UINT32_C(314));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\220\224\200")->to_ui32() == UINT32_C(315));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\220\235\200")->to_ui32() == UINT32_C(316));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\220\240\200")->to_ui32() == UINT32_C(317));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\220\244\240")->to_ui32() == UINT32_C(318));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\220\246\200")->to_ui32() == UINT32_C(319));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\220\246\240")->to_ui32() == UINT32_C(320));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\220\250\200")->to_ui32() == UINT32_C(321));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\220\254\200")->to_ui32() == UINT32_C(322));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\220\260\200")->to_ui32() == UINT32_C(323));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\220\260\201")->to_ui32() == UINT32_C(324));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\220\262\200")->to_ui32() == UINT32_C(325));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\221\200\205")->to_ui32() == UINT32_C(326));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\221\202\203")->to_ui32() == UINT32_C(327));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\221\204\247")->to_ui32() == UINT32_C(328));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\221\205\220")->to_ui32() == UINT32_C(329));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\221\206\203")->to_ui32() == UINT32_C(330));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\221\210\200")->to_ui32() == UINT32_C(331));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\221\212\200")->to_ui32() == UINT32_C(332));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\221\212\260")->to_ui32() == UINT32_C(333));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\221\214\205")->to_ui32() == UINT32_C(334));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\221\215\260")->to_ui32() == UINT32_C(335));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\221\220\200")->to_ui32() == UINT32_C(336));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\221\222\201")->to_ui32() == UINT32_C(337));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\221\226\200")->to_ui32() == UINT32_C(338));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\221\230\200")->to_ui32() == UINT32_C(339));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\221\232\200")->to_ui32() == UINT32_C(340));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\221\234\222")->to_ui32() == UINT32_C(341));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\221\234\240")->to_ui32() == UINT32_C(342));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\221\242\241")->to_ui32() == UINT32_C(343));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\221\253\225")->to_ui32() == UINT32_C(344));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\221\260\200")->to_ui32() == UINT32_C(345));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\221\262\217")->to_ui32() == UINT32_C(346));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\221\262\257")->to_ui32() == UINT32_C(347));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\222\200\200")->to_ui32() == UINT32_C(348));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\226\247\225")->to_ui32() == UINT32_C(349));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\226\251\206")->to_ui32() == UINT32_C(350));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\226\253\247")->to_ui32() == UINT32_C(351));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\226\275\224")->to_ui32() == UINT32_C(352));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\233\261\201")->to_ui32() == UINT32_C(353));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\233\261\244")->to_ui32() == UINT32_C(354));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\236\240\243")->to_ui32() == UINT32_C(355));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\237\207\246")->to_ui32() == UINT32_C(356));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\261\255")->to_ui32() == UINT32_C(357));
   CHECK(bkend.call_with_return(nullptr, "env", "\316\233")->to_ui32() == UINT32_C(358));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\261\260")->to_ui32() == UINT32_C(359));
   CHECK(bkend.call_with_return(nullptr, "env", "\302\252")->to_ui32() == UINT32_C(360));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\210\200")->to_ui32() == UINT32_C(361));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\202\263")->to_ui32() == UINT32_C(362));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\220\244\200")->to_ui32() == UINT32_C(363));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\262\200")->to_ui32() == UINT32_C(364));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\220\214\260")->to_ui32() == UINT32_C(365));
   CHECK(bkend.call_with_return(nullptr, "env", "\316\206")->to_ui32() == UINT32_C(366));
   CHECK(bkend.call_with_return(nullptr, "env", "\316\221")->to_ui32() == UINT32_C(367));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\274\210")->to_ui32() == UINT32_C(368));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\274\211")->to_ui32() == UINT32_C(369));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\274\212")->to_ui32() == UINT32_C(370));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\274\213")->to_ui32() == UINT32_C(371));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\274\214")->to_ui32() == UINT32_C(372));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\274\215")->to_ui32() == UINT32_C(373));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\274\216")->to_ui32() == UINT32_C(374));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\274\217")->to_ui32() == UINT32_C(375));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\276\210")->to_ui32() == UINT32_C(376));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\276\211")->to_ui32() == UINT32_C(377));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\276\212")->to_ui32() == UINT32_C(378));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\276\213")->to_ui32() == UINT32_C(379));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\276\214")->to_ui32() == UINT32_C(380));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\276\215")->to_ui32() == UINT32_C(381));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\276\216")->to_ui32() == UINT32_C(382));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\276\217")->to_ui32() == UINT32_C(383));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\276\270")->to_ui32() == UINT32_C(384));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\276\271")->to_ui32() == UINT32_C(385));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\276\272")->to_ui32() == UINT32_C(386));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\276\273")->to_ui32() == UINT32_C(387));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\276\274")->to_ui32() == UINT32_C(388));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\235\232\250")->to_ui32() == UINT32_C(389));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\235\233\242")->to_ui32() == UINT32_C(390));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\235\234\234")->to_ui32() == UINT32_C(391));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\235\235\226")->to_ui32() == UINT32_C(392));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\235\236\220")->to_ui32() == UINT32_C(393));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\215\266")->to_ui32() == UINT32_C(394));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\215\272")->to_ui32() == UINT32_C(395));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\251\234")->to_ui32() == UINT32_C(396));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\227\205")->to_ui32() == UINT32_C(397));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\216\252")->to_ui32() == UINT32_C(398));
   CHECK(bkend.call_with_return(nullptr, "env", ")\313\272\313\274\360\224\227\217\360\235\205\264\360\235\205\266\360\235\205\270\360\235\205\272\342\201\276\342\202\216\342\235\251\342\235\253\342\237\257\357\264\277\357\270\266\357\271\232\357\274\211\357\275\240\363\240\200\251\342\235\263\342\235\265\342\237\247\342\237\251\342\237\253\342\237\255\342\246\210\342\246\212\342\246\226\342\270\243\342\270\245\357\270\230\357\270\270\357\270\272\357\270\274\357\270\276\357\271\200\357\271\202\357\271\204\357\271\210\357\271\234\357\271\236\357\274\275\357\275\235\357\275\243\363\240\201\235\363\240\201\275\302\273\342\200\231\342\200\235\342\200\272\342\235\257")->to_ui32() == UINT32_C(399));
   CHECK(bkend.call_with_return(nullptr, "env", "(\313\271\313\273\360\224\227\216\360\235\205\263\360\235\205\265\360\235\205\267\360\235\205\271\342\201\275\342\202\215\342\235\250\342\235\252\342\237\256\357\264\276\357\270\265\357\271\231\357\274\210\357\275\237\363\240\200\250\342\235\262\342\235\264\342\237\246\342\237\250\342\237\252\342\237\254\342\246\207\342\246\211\342\246\225\342\270\242\342\270\244\357\270\227\357\270\267\357\270\271\357\270\273\357\270\275\357\270\277\357\271\201\357\271\203\357\271\207\357\271\233\357\271\235\357\274\273\357\275\233\357\275\242\363\240\201\233\363\240\201\273\302\253\342\200\230\342\200\234\342\200\271\342\235\256")->to_ui32() == UINT32_C(400));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\235\252\213\360\235\252\244")->to_ui32() == UINT32_C(401));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\235\252\213")->to_ui32() == UINT32_C(402));
   CHECK(bkend.call_with_return(nullptr, "env", "\302\275")->to_ui32() == UINT32_C(403));
   CHECK(bkend.call_with_return(nullptr, "env", "1\342\201\2042")->to_ui32() == UINT32_C(404));
   CHECK(bkend.call_with_return(nullptr, "env", "1/2")->to_ui32() == UINT32_C(405));
   CHECK(bkend.call_with_return(nullptr, "env", "\340\255\263")->to_ui32() == UINT32_C(406));
   CHECK(bkend.call_with_return(nullptr, "env", "\340\265\264")->to_ui32() == UINT32_C(407));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\263\275")->to_ui32() == UINT32_C(408));
   CHECK(bkend.call_with_return(nullptr, "env", "\352\240\261")->to_ui32() == UINT32_C(409));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\220\205\201")->to_ui32() == UINT32_C(410));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\220\205\265")->to_ui32() == UINT32_C(411));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\220\205\266")->to_ui32() == UINT32_C(412));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\220\246\275")->to_ui32() == UINT32_C(413));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\220\271\273")->to_ui32() == UINT32_C(414));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\274\202")->to_ui32() == UINT32_C(415));
   CHECK(bkend.call_with_return(nullptr, "env", "")->to_ui32() == UINT32_C(416));
   CHECK(bkend.call_with_return(nullptr, "env", "\010")->to_ui32() == UINT32_C(417));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\214\253")->to_ui32() == UINT32_C(418));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\214\246")->to_ui32() == UINT32_C(419));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\220\210")->to_ui32() == UINT32_C(420));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\220\241")->to_ui32() == UINT32_C(421));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\267\273")->to_ui32() == UINT32_C(422));
   CHECK(bkend.call_with_return(nullptr, "env", "\017")->to_ui32() == UINT32_C(423));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\206\220")->to_ui32() == UINT32_C(424));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\214\247")->to_ui32() == UINT32_C(425));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\215\222")->to_ui32() == UINT32_C(426));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\215\224")->to_ui32() == UINT32_C(427));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\215\242")->to_ui32() == UINT32_C(428));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\215\253")->to_ui32() == UINT32_C(429));
   CHECK(bkend.call_with_return(nullptr, "env", "\032")->to_ui32() == UINT32_C(430));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\220\246")->to_ui32() == UINT32_C(431));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\220\232")->to_ui32() == UINT32_C(432));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\277\274")->to_ui32() == UINT32_C(433));
   CHECK(bkend.call_with_return(nullptr, "env", "?")->to_ui32() == UINT32_C(434));
   CHECK(bkend.call_with_return(nullptr, "env", "\302\277")->to_ui32() == UINT32_C(435));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\245\205")->to_ui32() == UINT32_C(436));
   CHECK(bkend.call_with_return(nullptr, "env", "\315\276")->to_ui32() == UINT32_C(437));
   CHECK(bkend.call_with_return(nullptr, "env", "\325\236")->to_ui32() == UINT32_C(438));
   CHECK(bkend.call_with_return(nullptr, "env", "\330\237")->to_ui32() == UINT32_C(439));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\215\247")->to_ui32() == UINT32_C(440));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\201\207")->to_ui32() == UINT32_C(441));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\215\260")->to_ui32() == UINT32_C(442));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\235\223")->to_ui32() == UINT32_C(443));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\235\224")->to_ui32() == UINT32_C(444));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\263\272")->to_ui32() == UINT32_C(445));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\263\273")->to_ui32() == UINT32_C(446));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\270\256")->to_ui32() == UINT32_C(447));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\211\204")->to_ui32() == UINT32_C(448));
   CHECK(bkend.call_with_return(nullptr, "env", "\352\230\217")->to_ui32() == UINT32_C(449));
   CHECK(bkend.call_with_return(nullptr, "env", "\352\233\267")->to_ui32() == UINT32_C(450));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\270\226")->to_ui32() == UINT32_C(451));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\271\226")->to_ui32() == UINT32_C(452));
   CHECK(bkend.call_with_return(nullptr, "env", "\357\274\237")->to_ui32() == UINT32_C(453));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\221\205\203")->to_ui32() == UINT32_C(454));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\236\245\237")->to_ui32() == UINT32_C(455));
   CHECK(bkend.call_with_return(nullptr, "env", "\363\240\200\277")->to_ui32() == UINT32_C(456));
   CHECK(bkend.call_with_return(nullptr, "env", "\360\226\241\204")->to_ui32() == UINT32_C(457));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\257\221")->to_ui32() == UINT32_C(458));
   CHECK(bkend.call_with_return(nullptr, "env", "\302\266")->to_ui32() == UINT32_C(459));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\201\213")->to_ui32() == UINT32_C(460));
   CHECK(bkend.call_with_return(nullptr, "env", "\334\200")->to_ui32() == UINT32_C(461));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\203\273")->to_ui32() == UINT32_C(462));
   CHECK(bkend.call_with_return(nullptr, "env", "\341\215\250")->to_ui32() == UINT32_C(463));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\200\267")->to_ui32() == UINT32_C(464));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\235\241")->to_ui32() == UINT32_C(465));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\270\217")->to_ui32() == UINT32_C(466));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\270\220")->to_ui32() == UINT32_C(467));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\270\221")->to_ui32() == UINT32_C(468));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\270\216")->to_ui32() == UINT32_C(469));
   CHECK(bkend.call_with_return(nullptr, "env", "\024")->to_ui32() == UINT32_C(470));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\230\231")->to_ui32() == UINT32_C(471));
   CHECK(bkend.call_with_return(nullptr, "env", "\342\270\277")->to_ui32() == UINT32_C(472));
   CHECK(bkend.call_with_return(nullptr, "env", "\343\200\207")->to_ui32() == UINT32_C(473));
   CHECK(bkend.call_with_return(nullptr, "env", "\340\271\233")->to_ui32() == UINT32_C(474));
   CHECK(bkend.call_with_return(nullptr, "env", "\352\231\256")->to_ui32() == UINT32_C(475));
}

/*
BACKEND_TEST_CASE( "Testing wasm <names_3_wasm>", "[names_3_wasm_tests]" ) {
   using backend_t = backend<std::nullptr_t, TestType>;
   auto code = backend_t::read_wasm( std::string(wasm_directory) + "names.3.wasm");
   backend_t bkend( code );
   bkend.set_wasm_allocator( &wa );
   bkend.initialize(nullptr);

   CHECK(!bkend.call_with_return(nullptr, "env", "print32", UINT32_C(42), UINT32_C(123)));
}
*/
